package com.byinsight.web.actions.expense;

import com.byinsight.web.actions.CheckSessionAction;
import com.byinsight.web.actions.util.ExpenseParser;

public class UpdateExpenseAction extends CheckSessionAction {
	private static final long serialVersionUID = 6459371686704520888L;
	private String expenses;

	@Override
	protected String process() {
		ExpenseParser parser = new ExpenseParser();
		parser.parse(getExpenses());
		//for tags, just pass in the literal tag - needn't care anything more about it
		expenseService.update(parser.getUpdatedExpenses(), parser.getDeletedExpenses());
		return null;
	}
	
	/* common */
	public String getExpenses() {
//		return getUTF8String(expenses);
		return expenses;
	}

	public void setExpenses(String expenses) {
		this.expenses = expenses;
	}
	
}
